import { createRouter, createWebHistory } from 'vue-router'
import Layout from '../layout/Layout.vue'

const routes = [
  {
    path: '/',
    name: 'Layout',
    component: Layout,
    //  redirect: "/qqq",
    children: [
      {
        path: '/user',
        name: 'User',
        component: () => import("@/views/User"),
      },
      {
        path: '/stufile',
        name: 'StuFile',
        component: () => import("@/views/StuFile"),
      },
      {
        path: '/stufdback',
        name: 'StuFdBack',
        component: () => import("@/views/StuFdBack"),
      },
      {
        path: '/person',
        name: 'Person',
        component: ()=>import("@/views/Person")
      },
      {
        path: '/sechandr',
        name: 'SecHandR',
        component: ()=>import("@/views/SecHandR")
      },
      {
        path: '/person',
        name: 'Person',
        component: ()=>import("@/views/Person")
      },
      {
        path: '/lab',
        name: 'Lab',
        component: ()=>import("@/views/Lab")
      },
      {
        path: '/stuerp',
        name: 'StuERP',
        component: ()=>import("@/views/StuERP")
      },
      {
        path: '/booklend',
        name: 'BookLend',
        component: ()=>import("@/views/BookLend")
      },
      {
        path: '/message',
        name: 'Message',
        component: ()=>import("@/views/Message")
      },
      {
        path: '/borrow',
        name: 'Borrow',
        component: ()=>import("@/views/Borrow")
      },
      {
        path: '/stufilels',
        name: 'StuFileLS',
        component: ()=>import("@/views/StuFileLS")
      },
      {
        path: '/tcourse',
        name: 'TCourse',
        component: ()=>import("@/views/TCourse")
      },
      {
        path: '/sechandstu',
        name: 'SecHandStu',
        component: ()=>import("@/views/SecHandStu")
      },



    ]
  },
  {
    path: '/login',
    name: 'Login',
    component: ()=>import("@/views/Login")
  },
  {
    path: '/register',
    name: 'Register',
    component: ()=>import("@/views/Register")
  },
  

]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
